#ifndef __SUBSYSTEM_GRAVESTONE_BLOCK_BEHAVIOR_H__
#define __SUBSYSTEM_GRAVESTONE_BLOCK_BEHAVIOR_H__

#include <set>
#include <mutex>
#include "Engine/Point3.hpp"
#include "Subsystems/BlockBehaviors/SubsystemBlockBehavior.hpp"

using namespace PocketSurvival::Engine;

namespace PocketSurvival
{
    class SubsystemTerrain;

    // 墓碑行为，墓碑下方必须有可以阻挡的方块，不然会直接掉落
    class SubsystemGravestoneBlockBehavior : public SubsystemBlockBehavior
    {
    protected:
        SubsystemTerrain *m_terrain;

    public:
        SubsystemGravestoneBlockBehavior();

        virtual void onNeighborBlockChanged(int32_t x, int32_t y, int32_t z, int32_t neighborX, int32_t neighborY, int32_t neighborZ) override;
        virtual void load(const nlohmann::json& json) override;

        virtual const std::string& getName() const override;
    };
    
}

#endif
